package bold.deposit.useful.spring;

import com.alibaba.fastjson.JSON;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.StopWatch;

import java.util.concurrent.TimeUnit;

/**
 * @author Khai Loon
 * @version 2017/11/30
 */
public class Demo {
    public static void main(String[] args) throws InterruptedException {
        //时间记录器
        StopWatch stopWatch = new StopWatch();
        stopWatch.start();
        TimeUnit.SECONDS.sleep(1);
        System.out.println(stopWatch.toString());

        //一个key可以存放多个值的LinkedMap
        LinkedMultiValueMap mapList = new LinkedMultiValueMap<String, Integer>();
        mapList.add("1", 11111);
        mapList.add("1", 11111);
        mapList.add("2", 2222);
        mapList.add("3", 3333);
        mapList.add("4", 4444);
        System.out.println(JSON.toJSON(mapList));
    }
}
